package nc.ui.arap.verifyitflog.action;

import nc.ui.uif2.model.IMultiRowSelectModel;
import nc.vo.arap.verifyitflog.AggVerifyItfHeadLog;

public class DeleteDataAction extends nc.ui.pubapp.uif2app.actions.DeleteAction {

	private static final long serialVersionUID = 7791623477504284301L;

	@Override
	protected boolean isActionEnable() {
		Object[] objs = null;
		if (null != getModel().getSelectedData()) {
			objs = new Object[] { getModel().getSelectedData() };
		} else if ((getModel() instanceof IMultiRowSelectModel)) {
			objs = ((IMultiRowSelectModel) getModel()).getSelectedOperaDatas();
		}
		if (objs == null || objs.length == 0) {
			return false;
		}
		for (Object obj : objs) {
			AggVerifyItfHeadLog aggatvo = (AggVerifyItfHeadLog) obj;
			String sendStatus = aggatvo.getParentVO().getSend_status();
			if (sendStatus != null && sendStatus.equals("1")) {
				return false;
			}
		}
		return true;
	}

}
